#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "../src/include/posix_shmem.h"
#include "../src/include/test_utils.h"
char * msg;
int size = SHMEM_SIZE - sizeof(int) - sizeof(int);

int main() {
    msg = (char *)malloc(size);
    init_shmem(0);     
    while(1) {
        int flag = scanf("%s", msg);
        if (flag == EOF) {
            clearerr(stdin);
            continue;
        }
        send_message(sizeof(msg), msg);
    }
    return 0;
}